package com.zuoye.day09;

public class Password {
    public static void main(String[] args) {
        String str = "Welcome";
        char str1[] = new char[7];
        int k = 1;
        String str11 = str.substring(k, str.length()) + str.substring(0, k);
       // System.out.println(str11);
        for (int i = 0; i < str.length(); i++) {
            str1[i] = (char) (str11.charAt(i));
            str1[i] += 3;
            System.out.print(str1[i]);

        }

        System.out.println("");

        String encrypted = "hofrphZ";
        char[] en2 = new char[7];
        int k1 = 1;
        String en11 = encrypted.substring(encrypted.length() - 1) + encrypted.substring(0, encrypted.length() - 1);
      //  System.out.println(en11);
        for (int j = 0; j < encrypted.length(); j++) {
            str1[j] = (char) (en11.charAt(j));
            str1[j] -= 3;
            System.out.print(str1[j]);


        }


    }
}
